<!doctype html>
<html>
	<head>
		<title>Product Edit</title>
		<?php include '_head_init.php' ?>
		<script src="js/jquery/ajaxfileupload.js"></script>
		<script src="js/product_edit.js" type="text/javascript"></script>
	</head>
	<body>
		<?php include '_navbar.php' ?>
		<div class="container">
			<div class="row">
				<div class="span12">
					<ul class="thumbnails">
						<li class="span3">
							<div class="thumbnail">
								<img id="product-pre-vote-picture" rel="tooltip" data-placement="top" data-original-title="投票之前图片" src="img/product2_pre_vote.jpg">
								<div class="caption">
									<button class="btn btn-block" href="#productPreVotePictureModal" role="button" data-toggle="modal">投票之前 298x175</button>
								</div>
							</div>
						</li>
						<li class="span3">
							<div class="thumbnail">
								<img id="product-low-discount-picture" rel="tooltip" data-placement="top" data-original-title="心动折扣图片" src="img/product2_low_discount.jpg">
								<div class="caption">
									<a class="btn btn-block" href="#productLowDiscountPictureModal" role="button" data-toggle="modal">心动折扣 298x175</a>
								</div>
							</div>
						</li>
						<li class="span3">
							<div class="thumbnail">
								<img id="product-high-discount-picture" rel="tooltip" data-placement="top" data-original-title="终极折扣图片" src="img/product2_high_discount.jpg">
								<div class="caption">
									<button class="btn btn-block" href="#productHighDiscountPictureModal" role="button" data-toggle="modal">终极折扣 298x175</button>
								</div>
							</div>
						</li>
						<li class="span3">
							<div class="thumbnail">
								<img id="product-sharing-picture" rel="tooltip" data-placement="top" data-original-title="微博分享图片" src="img/product2_share.jpg">
								<div class="caption">
									<button class="btn btn-block" href="#productSharingPictureModal" role="button" data-toggle="modal">微博分享 430x250</button>
								</div>
							</div>
						</li>
					</ul>
					<script type="text/javascript">
						$('#product-high-discount-picture, #product-low-discount-picture, #product-sharing-picture, #product-pre-vote-picture').tooltip({});
					</script>
					<legend>Product Property</legend>
					<form name="product" class="form-horizontal">
						<div class="control-group">
							<label class="control-label" for="inputProductRequiredVotes">达标投票数</label>
							<div class="controls">
								<div class="input-append">
									<input class="span2" type="text" id="inputProductRequiredVotes" name="product_required_votes" placeholder="1000"><span class="add-on">人</span>
									<span style="margin-left: 10px;" class="label">填写的值最好为5的倍数</span>
								</div>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="inputProductVoteCount">当前投票数</label>
							<div class="controls">
								<div class="input-append">
									<input class="span2" type="text" id="inputProductVoteCount" name="product_vote_count" placeholder="1000"><span class="add-on">人</span>
									<span action="restore-product-vote-count" style="margin-left: 10px;" class="btn">恢复为实际人数</span>
								</div>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="inputProductShareCount">当前分享数</label>
							<div class="controls">
								<div class="input-append">
									<input class="span2" type="text" id="inputProductShareCount" name="product_share_count" placeholder="1000"><span class="add-on">人</span>
									<span action="restore-product-share-count" style="margin-left: 10px;" class="btn">恢复为实际人数</span>
								</div>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="inputProductHighDiscount">终极折扣</label>
							<div class="controls">
								<div class="input-append">
									<input class="span2" type="text" id="inputProductHighDiscount" name="product_high_discount" placeholder="55"><span class="add-on">%</span>
								</div>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="inputProductLowDiscount">心动折扣</label>
							<div class="controls">
								<div class="input-append">
									<input class="span2" type="text" id="inputProductLowDiscount" name="product_low_discount" placeholder="85"><span class="add-on">%</span>
								</div>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="inputProductHighDiscountLink">终极链接</label>
							<div class="controls">
								<input class="span8" type="text" id="inputProductHighDiscountLink" name="product_high_discount_link" placeholder="http://shop.mediamarkt.cn/product_high_discount.html">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="inputProductLowDiscountLink">心动链接</label>
							<div class="controls">
								<input class="span8" type="text" id="inputProductLowDiscountLink" name="product_low_discount_link" placeholder="http://shop.mediamarkt.cn/product_low_discount.html">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="inputProductFullPriceLink">原价链接</label>
							<div class="controls">
								<input class="span8" type="text" id="inputProductFullPriceLink" name="product_full_price_link" placeholder="http://shop.mediamarkt.cn/product_full_price.html">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="inputProductName">产品名称</label>
							<div class="controls">
								<input class="span8" type="text" id="inputProductName" name="product_name" placeholder="尼康D5100单反相机">
							</div>
						</div>
						<div class="form-actions">
							<button type="submit" class="btn btn-primary">Submit</button>
						</div>
					</form>
				</div>
			</div>

			<div class="modal hide" id="productHighDiscountPictureModal" tabindex="-1" role="dialog" aria-labelledby="productHighDiscountPictureModalLabel" aria-hidden="true">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4>终极折扣图片</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" action="/app/api/product/set_product_picture" method="post" enctype="multipart/form-data">
						<div class="control-group">
							<label class="control-label" for="inputProductHighDiscountPicture">选择图片</label>
							<div class="controls">
								<input type="file" id="inputProductHighDiscountPicture" data-url="/app/index.php?d=admin&c=product&m=set_product_high_discount_picture" name="product_high_discount_picture">
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<a action="cancel" class="btn" data-dismiss="modal" aria-hidden="true">取消</a>
					<a action="submit" class="btn btn-primary">上传</a>
				</div>
			</div> <!-- end modal -->

			<div class="modal hide" id="productLowDiscountPictureModal" tabindex="-1" role="dialog" aria-labelledby="productLowDiscountPictureModalLabel" aria-hidden="true">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4>心动折扣图片</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" action="/app/api/product/set_product_picture" method="post" enctype="multipart/form-data">
						<div class="control-group">
							<label class="control-label" for="inputProductLowDiscountPicture">选择图片</label>
							<div class="controls">
								<input type="file" id="inputProductLowDiscountPicture" name="product_low_discount_picture">
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<a action="cancel" href="#" class="btn" data-dismiss="modal" aria-hidden="true">取消</a>
					<a action="submit" href="#" class="btn btn-primary">上传</a>
				</div>
			</div> <!-- end modal -->

			<div class="modal hide" id="productSharingPictureModal" tabindex="-1" role="dialog" aria-labelledby="productSharingPictureModalLabel" aria-hidden="true">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4>微博分享图片</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" action="/app/api/product/set_product_picture" method="post" enctype="multipart/form-data">
						<div class="control-group">
							<label class="control-label" for="inputProductSharingPicture">选择图片</label>
							<div class="controls">
								<input type="file" id="inputProductSharingPicture" name="product_sharing_picture">
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<a action="cancel" href="#" class="btn" data-dismiss="modal" aria-hidden="true">取消</a>
					<a action="submit" href="#" class="btn btn-primary">上传</a>
				</div>
			</div> <!-- end modal -->

			<div class="modal hide" id="productPreVotePictureModal" tabindex="-1" role="dialog" aria-labelledby="productPreVotePictureModalLabel" aria-hidden="true">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4>投票前图片</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" action="/app/api/product/set_product_picture" method="post" enctype="multipart/form-data">
						<div class="control-group">
							<label class="control-label" for="inputProductPreVotePicture">选择图片</label>
							<div class="controls">
								<input type="file" id="inputProductPreVotePicture" name="product_pre_vote_picture">
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<a action="cancel" href="#" class="btn" data-dismiss="modal" aria-hidden="true">取消</a>
					<a action="submit" href="#" class="btn btn-primary">上传</a>
				</div>
			</div> <!-- end modal -->

		</div> <!-- end container -->
	</body>

</html>